package com.leigang.swagger.untils;

import java.util.HashMap;
import java.util.Map;

public class ResultMap {

    public static Map map = new HashMap();
    public  static Map<Object, Object> sucess(Object object){
        map.put("code","200");
        map.put("message","操作成功");
        map.put("data",object);
        return map;
    }

    public  static Map<Object, Object> sucess(){
        map.put("code","200");
        map.put("message","操作成功");
        map.put("data","");
        return map;
    }

    public static   Map<Object, Object> error(Object object){
        map.put("code","500");
        map.put("message","操作失败");
        map.put("data",object);
        return map;
    }

    public static   Map<Object, Object> error(){
        map.put("code","500");
        map.put("message","操作失败");
        map.put("data","");
        return map;
    }
}
